home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
print
/
cal13.arj
/
CAL.DOC
< prev
next >
Wrap
Text File
|
1992-01-16
|
11KB
|
248 lines
Original Documentation written by : Leonard N. Devoe
Revisions to Documentation by : Dan Devoe
CAL.EXE (Calendar)
══════════════════
This program, which was written in Turbo C++ v1.01 contains
ACCURATE calendars from the year 1 through 65,535. The program
has been recompiled under Turbo C++ v1.01 in order to create a
single executable file, viz. CAL.EXE, which is over 50% smaller
than the Pascal version (with additional features). The original
version contained two files: CAL.COM & CAL.000 both of which were
needed if a leap year was accessed. The year, which is converted
to an integer, now accepts values up to the year 65,535; since
negative values are not allowed, the year is now treated as an
unsigned integer. Why waste 32,768 perfectly good years? :-)
The syntax for the program is merely to enter the command at
the MS-DOS prompt followed by a space and the desired year, e.g.
C> Cal 1992
If the year is not entered on the command line, the program
will prompt for the year. The year must be between 1 and 65535;
if it isn't, an error message will be displayed for approximately
one and a half seconds after which the program will again prompt
for the year. The program will display six months of the year on
each of two screens.
Because of the size of this program, it is probably best
suited for use on a hard-disk system where it can remain resident
without an appreciable drain on disk space .
This program is similar to the one used in the Unix
operating system with one major exception, that system adopts the
Gregorian calendar in 1752. This was done in all likelihood
because of the fact that the United States was part of the
British Empire when the switch was made and therefore many of the
dates in our colonial history and prior are entrenched with the
British. However, as you will note in the abridged history, most
dates in American history have been converted to Gregorian dates,
therefore, there isn't any logical reason not to make the switch
to the Gregorian calendar when it was first adopted, namely in
1582, which is the year that this program uses.
- 1 -
ABRIDGED HISTORY OF THE CALENDAR
════════════════════════════════
JULIAN CALENDAR
───────────────
The first modern Calendar was put into use in 45 B.C. by
Julius Caesar who decreed that henceforth there should be three
years of 365 days each and then one year of 366 days, in
perpetual cycle. This became known as the Julian Calendar, and
began the custom we still observe today of adding one day to the
month of February every fourth year, or Leap Year as it is known.
Even though the Julian Calendar was an enormous improvement
over all previous systems, it still was not completely accurate.
Since there are approximately 365 1/4 days in a solar year, the
Julian Calendar was reasonably satisfactory for many years - but
there are not exactly 365 1/4 days in a year. The exact solar year
consists of 365 days, 5 hours, 48 minutes, 47.8 seconds. The
difference of about eleven minutes becomes appreciable in the
course of several centuries.
GREGORIAN CALENDAR
──────────────────
The final Calendar correction was done in 1582 by Pope
Gregory XIII, and the corrected Calendar that we use today is
called the Gregorian Calendar. First, in order to make up for all
the days which had accumulated since the beginning of the Julian
Calendar, Pope Gregory XIII decreed the elimination of 10 days
from the year 1582. This was done, and in many countries the day
after October 4, 1582 became October 15, 1582.
Pope Gregory XIII also installed the Leap Year rule which is
now in effect and which will serve us for more than a thousand
years hence. The Gregorian Leap Year rule provides for dropping a
day from every centesimal year (ending in 00) whose number cannot
be divided by 400. Thus, a day was dropped in the years 1700,
1800 and 1900. This meant that the years 1700, 1800 and 1900 were
not Leap Years, i.e. had 28 days in February. The day will not be
dropped in the year 2000, so the month of February, 2000 will
have 29 days. The error in our present Calendar is less than one
day every 3000 years, so, although the Gregorian Calendar is a
great improvement over the Julian Calendar, it still is not 100%
accurate. However, the cesium atom clock which was developed
around 1950 is being used as a master clock and corrections have
been made and will continue to be made to the current calendar
which will give it an accuracy of as high as one second in 30,000
years.
- 2 -
ADOPTION OF GREGORIAN CALENDAR
──────────────────────────────
Although the initial adoption of the Gregorian Calendar was
in 1582, its use was by no means universal. As might be expected,
the first countries to adopt the new Calendar were primarily
Roman Catholic nations. Most Protestant countries did not adopt
the Gregorian Calendar until later.
The American Colonies made the switch in 1752, when the
whole British Empire changed. September 2, 1752 was followed by
September 14, 1752. Note that an eleven day adjustment was now
needed, the Julian Calendar having added another day between 1582
and 1752. Dates preceding the change are sometimes
designated OS for Old Style. Thus, George Washington's birthday
is really February 11, 1732 (OS), and only after the change to
the Gregorian Calendar was his birthday established as February
22, 1732. Most dates in American History have been converted to
New Style, or Gregorian dates. Other countries have been even
slower in adopting the new Calendar: Japan, 1873; China, 1912;
Soviet Union, 1918; Greece, 1924; Turkey, 1927.
CREDIT WHERE CREDIT IS DUE...
═════════════════════════════
I would like to thank the following people for making this program
possible -- they all played a role, no matter how small:
- Leonard N. Devoe, for original concept and design.
- Dianne Parisien, for giving me Turbo C++ for Christmas.
- Paul Edwards, for using his non-leap-year formula as a
guideline to getting my formula working properly (for both
Gregorian and Julian years).
- Borland International, for producing Turbo C++.
- The computer science faculity at Salem State college for
assisting me in my programming technique for the past four
years.
- 3 -
PUBLIC DOMAIN & DISCLAIMER
══════════════════════════
This program was originally compiled under CP/M and placed in
the public domain in March of 1986. The source code had been
slightly modified and recompiled under MS-DOS and is being placed
in the MS-DOS public domain on May 19, 1987. A major re-write
was done using Turbo C++, completed on Jan 15, 1992, and released
as shareware on Jan 16, 1992. This new version has the following
new features:
- Maximum year increased from 32,767 to 65,535
- Color added to make program look more "Professional"
- Previous/next years can be viewed after the current year is
displayed.
- Registration file ("Cal.Reg") added for registration ID.
- The program is now shareware; registration is $7. However,
for every copy of this program that is registered with
your name, serial number, and registration code, you will
receive a $2 commission, which will be sent to you at the
end of each month. Suppose 10 people register this program
one month, you will receive a check for $20. $2 doesn't
sounds like a lot, but it can add up, and you will support-
ing the shareware concept.
Please do not alter lines one and two in the registration file, as
you will be jipping someone of a possible $2 commission (which, as
mentioned earlier, can add up -- how would you feel if someone
altered your name?) Keep the file "Cal.Reg" in the same directory
as your "Cal.Exe" file, and make sure that that directory is in
your path. Until you register this program, a special file called
"Register.Cal" will be created in your CURRENT directory. Please
load this form into an editor and complete if you wish to support
the shareware conecpt. If you don't have a printer, please hand-
write the form EXACTLY as it appears in the file "Register.Cal".
The authors disclaims any liability or responsibility to any person
for any loss or damage alleged to be caused through the use of this
program.
Leonard N. Devoe 70147,1113 Dan Devoe 73030,446
46 Buena Vista Avenue
Salem, Massachusetts 01970-1042
(508) 744-3322 (508) 745-1689
- 4 -